package com.example.service.impl;

import com.example.service.HelloService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Service;

/**
 * @author mdl
 * @date 2020/3/11 16:46
 */
@Service(version = "${dubbo.version}")
@Slf4j
public class HelloServiceImpl implements HelloService {
    @Override
    public void say(String msg) {
        log.info("服务端打印..." + msg);
    }

    @Override
    public String eatMenu(Integer type) {
        String menu = "";
        switch (type) {
            case 1:
                menu = type + ": 米粥";
                break;
            case 2:
                menu = type + ": 鱼，米饭";
                break;
            case 3:
                menu = type + ": 鸡蛋面";
                break;
        }
        return menu;
    }
}